﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;

namespace PlanVisualization.Converters
{
    class GroupToColorConverter : IValueConverter
    {
        private static IValueConverter _instance = new GroupToColorConverter();

        public static IValueConverter Instance
        {
            get { return _instance; }
        }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Brush brush = Brushes.Black;
            switch ((int)value)
            {
                case 0:
                    brush = Brushes.Blue; break;
                case 1:
                    brush = Brushes.GreenYellow; break;
                case 2:
                    brush = Brushes.Coral; break;
                case 3:
                    brush = Brushes.DarkOrange; break;
                    
            }
            return brush;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
